package com.kingmed.kmss.common.constant.customer.cdm;

import java.util.Arrays;
import java.util.List;

public class CustConstants {

    //数据状态 0=未启用，1=已启用，2=失效
    public static String STATUS_INIT = "0";
    public static String STATUS_ENABLE = "1";
	public static String STATUS_DISABLE = "2";
	//初始版本
	public static String VERSION_INIT = "1";
	//是否最新版本（1=是，0=否）
	public static String VERSION_NEW_FALSE = "0";
	public static String VERSION_NEW_TRUE = "1";

	//组织客户编码类型：统一社会信用代码
	public static String AFFIRM_TYPE_CREDIT_CODE = "0";
    
    //图谱层级 0=根路径，1=第一层 2=第二层
    public static String LEVEL_0 = "0";
    public static String LEVEL_1 = "1";
    public static String LEVEL_2 = "2";

    //医联体类型
    public static List<String> allianceList = Arrays.asList("城市医疗联合体","医共体","专科医联体","远程医疗协作网");

    //脱敏字典code
    public static String DESEN_AUTH_FIELD = "auth_field";
    public static String DESEN_FIELD = "***";
    //脱敏策略-全部字段
    public static String DESEN_POLICY_ALL = "0";
    //脱敏策略-按配置字段
    public static String DESEN_POLICY_COLUMN = "1";

	//是否主要业务代表
	public static String IS_ENGAGE_PRIMARY="1";
	public static String IS_NOT_ENGAGE_PRIMARY="0";

	//客户群-组织客户
	public static List<String> customerGroupList = Arrays.asList("hospital","government","commercial");
	//客户群-标准科室
	public static List<String> stdDeptGroupList = Arrays.asList("standard_dept");
	//客户群-物理科室
	public static List<String> deptGroupList = Arrays.asList("dept");
	//客户群-医生/个人
	public static List<String> personGroupList = Arrays.asList("doctor");

	//天眼查更新数据库同步字段-1-客户名称、2-省-市-区、5-联系地址、6-法人姓名、7-所有制
	public static List<String> customerDbSyncFieldList = Arrays.asList("customerName","province-city-district","address","legalPerson","ownership");
	//天眼查返回对应字段-1-客户名称、2-省-市-区、5-联系地址、6-法人姓名、7-所有制
	public static List<String> tianyanSyncFieldList = Arrays.asList("name","base-city-district","regLocation","legalPersonName","ownership");

	public static String STR_REGEX = "-";

	//天眼查同步数据状态 0=未同步，1=已同步
	public static String SYNC_STATUS_0 = "0";
	public static String SYNC_STATUS_1 = "1";
	//天眼查所有制（公有）条件
	public static final String OWN_COMPANY_ORG_TYPE = "机关";
	public static final String OWN_ORG_TYPE = "事业单位";

	//字典typeCode：医联体/学协会-组织类型 cdm_alliance_org_type
	public static final String CDM_ALLIANCE_ORG_TYPE = "cdm_alliance_org_type";
	//字典typeCode：医联体/学协会-类型 cdm_alliance_type
	public static final String CDM_ALLIANCE_TYPE = "cdm_alliance_type";
	//字典typeCode：医联体/学协会-学协会等级 cdm_alliance_level
	public static final String CDM_ALLIANCE_LEVEL = "cdm_alliance_level";
	//字典typeCode：医生/个人-客户类型 cdm_person_type
	public static final String CDM_PERSON_TYPE = "cdm_person_type";
	//字典typeCode：医生/个人-学协会职务 cdm_alliance_person_title
	public static final String  CDM_ALLIANCE_PERSON_TITLE = "cdm_alliance_person_title";
	//字典typeCode：医生/个人-适合拜访时间 cdm_prefer_visit_time
	public static final String  CDM_PREFER_VISIT_TIME = "cdm_prefer_visit_time";
	//字典typeCode：医生/个人-门诊量 cdm_outpatient
	public static final String  CDM_OUTPATIENT = "cdm_outpatient";
	//字典typeCode：医生/个人-当前状态 cust_person_status
	public static final String  CDM_PERSON_STATUS = "cust_person_status";
	//字典typeCode：组织客户-医疗机构等级 cdm_hospital_grade
	public static final String  CDM_HOSPITAL_GRADE = "cdm_hospital_grade";
	//字典typeCode：组织客户-客户签约状态 cdm_customer_status
	public static final String  CDM_CUSTOMER_STATUS = "cdm_customer_status";
	//字典typeCode：组织客户-客户等级 cdm_grade_level_cust
	public static final String  CDM_GRADE_LEVEL_CUST = "cdm_grade_level_cust";

	/********专家档案 字典typeCode ***********************************/
	//专家专业类型 erm_major_type
	public static final String  ERM_MAJOR_TYPE = "erm_major_type";
	//专家签约类型 erm_sign_type
	public static final String  ERM_SIGN_TYPE = "erm_sign_type";
	//专家头衔 erm_expert_title
	public static final String  ERM_EXPERT_TITLE = "erm_expert_title";
	//关联疾病线 erm_disease_line
	public static final String  ERM_DISEASE_LINE = "erm_disease_line";
	//关联技术学科 erm_skill_discipline
	public static final String  ERM_SKILL_DISCIPLINE = "erm_skill_discipline";
	//学术会议支持等级 erm_meeting_level
	public static final String  ERM_MEETING_LEVEL = "erm_meeting_level";
	//专家支持时间 erm_support_time
	public static final String  ERM_SUPPORT_TIME = "erm_support_time";
	//专家支持形式 erm_support_form
	public static final String  ERM_SUPPORT_FORM = "erm_support_form";
	//合作费用结算方式 erm_settlement_type
	public static final String  ERM_SETTLEMENT_TYPE = "erm_settlement_type";
	//病例会诊支持范围 erm_disease_meeting_range
	public static final String  ERM_DISEASE_MEETING_RANGE = "erm_disease_meeting_range";
	//专家支持形式 erm_disease_support_form
	public static final String  ERM_DISEASE_SUPPORT_FORM = "erm_disease_support_form";
	//是否支持(会议/病例/查房) erm_is_support
	public static final String  ERM_IS_SUPPORT = "erm_is_support";
	//专家结算偏好 erm_settlement_mode
	public static final String  ERM_SETTLEMENT_MODE = "erm_settlement_mode";
	//当前状态 erm_expert_status
	public static final String  ERM_EXPERT_STATUS = "erm_expert_status";
	//专家合作类型 marketing_activity_expert_coop_type
	public static final String  ERM_COOP_TYPE = "marketing_activity_expert_coop_type";
	//担任角色 marketing_activity_expert_role
	public static final String  ERM_EXPERT_ROLE = "marketing_activity_expert_role";
	//营销活动-合作费用结算方式 mkt_activity_settlement_type
	public static final String  ERM_MKT_SETTLEMENT_TYPE = "mkt_activity_settlement_type";
	//营销活动-专家合作申请业务状态 expert_app_busin_status
	public static final String  ERM_EXPERT_APP_BUSIN_STATUS = "expert_app_busin_status";

	/********专家档案 记录变更字段 ***********************************/
	public static List<String> expertUpdateFieldList = Arrays.asList("expert_profile","is_support_meeting","is_supprot_disease_meeting","is_support_basic_round");

	/********专家档案 签约类型 ***********************************/
	//专家签约类型(1=签约型（兼职）,2=邀约型,3=全职型)
	public static String SIGN_TYPE_1 = "1";
	public static String SIGN_TYPE_2 = "2";
	public static String SIGN_TYPE_3 = "3";

	/********字典 职位名称-第一级/第二级 ***********************************/
	public static final String JOB_TITLE = "jobTitle";
	public static final String DUTY = "duty";
	public static final String UMS_JOB_TITLE = "ums_job_title";
	public static final String UMS_JOB_TITLE_PRACTITIONER = "ums_job_title_practitioner";
	public static List<String> dutyList = Arrays.asList("ums_job_title_practitioner","ums_job_title_1","ums_job_title_2","ums_job_title_3","ums_job_title_4","ums_job_title_5","ums_job_title_6","ums_job_title_7");
	/********字典 学协会/医联体类型 ***********************************/
	public static List<String> cdmAllianceTypeList = Arrays.asList("cdm_alliance_type_1","cdm_alliance_type_2");

	/********专家档案 是否计划内专家 ***********************************/
	//是否计划内专家(1=计划内专家,2=计划外专家)
	public static String IS_PLANNED_EXPERT_1 = "1";

	/********组织客户/科室变更记录 ***********************************/
	public static final String BIZ_TABLE_CUSTOMER = "cdm_customer_info";
	public static final String BIZ_TABLE_CUSTOMER_NAME = "标准客户信息";
	public static final String BIZ_TABLE_DEPT = "cdm_department_info";
	public static final String BIZ_TABLE_DEPT_NAME = "科室客户信息";

	/********组织客户 客户状态 ***********************************/
	//客户状态(1=签约客户、2=待开发、3=丢失客户)
	public static String CUSTOMER_STATUS_1 = "1";
	public static String CUSTOMER_STATUS_2 = "2";
	public static String CUSTOMER_STATUS_3 = "3";

	/******** 子/孙公司地址对照信息字典code ***********************************/
	public static String CDM_COMPANY_AND_SITE_CONTRAST = "cdm_company_and_site_contrast";
	/******** 类型（1集团，2大区，3子公司，4=孙公司） *************************/
	public static Integer CDM_COMPANY_TYPE = 3;


	//操作标识 create-创建  update=更新   open=开启   close=关闭
	public static String OPS_CREATE = "create";
	public static String OPS_UPDATE = "update";
	public static String OPS_OPEN = "open";
	public static String OPS_CLOSE = "close";

	//审批状态（0=草稿，1=审批中，2=预留，3=审批驳回，4=审批通过)
	public static final Integer APPROVE_DRAFT = 0;
	public static final Integer APPROVE_UNDER_APPROVAL = 1;
	public static final Integer APPROVE_APPROVED = 2;
	public static final Integer APPROVE_REJECT = 3;


	//# 客户分级管理部分
    public static class CdmGrade {
    	
    	// 默认评分权重
    	public static final long DEFAULT_FACTOR_RATIO = 1;
    	
		// Common
    	public static int DB_COMMON_TRUE_OR_ENABLED = 1;
    	// # 分级因子-定性定量
    	public static int FACTOR_COMPUTE_MODE_QUALITATIVE = 1;
    	
    	// # 分级因子-计算模式 - 单字段固定值
    	public static String FACTOR_CALC_MODE_SIMPLE = "1";
    	
    	// # 分级计算方式 - 自动计算
    	public static int FACTOR_CALC_METHOD_CALC = 1;
    	// # 分级计算方式 - 手动人工干预
    	public static int FACTOR_CALC_METHOD_MANUAL = 2;
    	
    	// # 分级计算方式 - 计算后使用上次手动人工干预结果(level)
    	public static int FACTOR_CALC_METHOD_KEEP_MANUAL = 3;
    	
    	// # 是否保留人工干预结果 - 保留
    	public static int FACTOR_CALC_TO_KEEP_MANUAL = 1;

    	// # 是否保留人工干预结果 - 不保留
    	public static int FACTOR_CALC_NOT_KEEP_MANUAL = 0;
    	
    	// # 分级方案客户类型 - 科室（标准）
    	public static String FACTOR_CALC_PLAN_CUST_TYPE_DEPT = "standard_dept";
    	// # 分级方案客户类型 - 医生
    	public static String FACTOR_CALC_PLAN_CUST_TYPE_PERSON = "person";
    	// # 分级方案客户类型 - 专家
    	public static String FACTOR_CALC_PLAN_CUST_TYPE_EXPERT = "expert";

    	// # 分级计算-批量计算大小
    	public static int FACTOR_CALC_BATCH_SIZE = 1000;
    	
    	// # 是否保留人工干预结果-所有（只用于前端查询条件）
    	public static int KEEP_MANUAL_ALL = -1;
    	
    	public static class SysDictCode {
    		public static String COMMON_YES_NO = "sys_common_yes_no";
    		
    		// 分级方案适用客户分类
    		public static String PLAN_CUST_TYPE = "cdm_grade_plan_cust_type";
    	  	// 客户分级管理-分级因子分类
    	  	public static String FACTOR_TYPE = "cdm_grade_factor_type";
    
    	  	// 客户分级管理-分级细则值描述
    	  	public static String FACTOR_SCORE_VALUE_DESC = "cdm_grade_factor_score_value_desc";

    	  	// 分级结果批量修改模板路径
    	  	public static String CFG_KEY_UPDATE_TEMPLATE_PATH = "result_batch_update_tpl_path";

    	  	// 客户分级模块配置项
    	  	public static String CDM_GRADE_CONFIGURATION = "cdm_grade_configuration";

    	  	// 医疗机构等级
    	  	public static String CDM_MEDICAL_GRADE = "cdm_hospital_grade";
    	  	
    	  	// 专科类型
    	  	public static String CDM_SPECIALTY_TYPE = "specialty_type";
        	
    	}
    	
    	/**
    	 * 前端数据操作代码
    	 * @author WZG
    	 *
    	 */
    	public static class DataOpsCode {
    	  	public static String CREATE = "create";
    	  	public static String UPDATE = "update";
    	  	public static String DELETE = "delete";
    	}
    	public static class DatabaseFlag {
    	  	public static int DELETED = 1;
    	  	public static int UNDELETED = 0;
    	  	public static int ACTIVE = 1;
    	  	public static int INACTIVE = 0;
    	}
    }

	public static final String CDM_GRADE_FACTOR_TYPE = "cdm_grade_factor_type";
    
}

